<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8">
</head>

<body>
	<script>
		var promise = new Promise((resolve, reject) => {
			resolve(100);
		})
		var p1 = promise.then((value) => {
			console.log(value);
			return p1;
			// 报错： Uncaught (in promise) TypeError: Chaining cycle detected for promise #<Promise>
			// promise对象被循环调用
			// 异常处理见 myPromise5.js
		})
	</script>
</body>

</html>